﻿using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using jcs.Core.SSManager;
namespace jcs.Core.SSManager.Tests
{
    /// <summary>
    /// Summary description for UnitTest1
    /// </summary>
    [TestClass]
    public class SnapshotTests
    {
       
        private const string SamplePath = "J:\\Databases\\evestment_snap.ss";
        private const string Extension = "_snap";

        [TestMethod]
        public void GetSnapshotTests()
        {

            var Snap = Factory.GetSnapshot("1", "2", "3", Extension, DateTime.Now);
            Assert.AreEqual("1", Snap.SnapshotName);
            Assert.AreEqual("2", Snap.LogicalFileName);
            Assert.AreEqual("3", Snap.FilePath);
            Assert.AreEqual(0, Snap.SparseFileSize);
            Assert.AreEqual(Extension, Snap.FileExtension);

            Snap = Factory.GetSnapshot("5", "6");
            Assert.AreEqual("5", Snap.SnapshotName);
            Assert.AreEqual("6", Snap.FilePath);

        }

        [TestMethod]
        public void SparseFileSizeTest()
        {
            var Snap = Factory.GetSnapshot("1", "2", SamplePath, Extension, DateTime.Now);
            Assert.AreNotEqual(0, Snap.SparseFileSize);
        }

    }
}
